package cn.wolfcode.luowowo.comment.repository;

import cn.wolfcode.luowowo.comment.domain.StrategyComment;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.mongodb.repository.MongoRepository;
import org.springframework.stereotype.Repository;

@Repository
public interface StrategyCommentMongoRepository extends MongoRepository<StrategyComment, String> {
    /**
     * 根据攻略文章id分页查询其下所有评论
     *
     * @param detailId 文章id
     * @param pageable 分页对象
     * @return
     */
    Page<StrategyComment> findByDetailId(Long detailId, Pageable pageable);
}
